const path = require('path')
function resolve(dir) {
    return path.join(__dirname, dir)
}
const webpack = require('webpack')

module.exports = {
    publicPath: "./",
    // 输出文件目录.

    outputDir: "dist",
    // 静态资源存放的文件夹(相对于ouputDir)
    assetsDir: "static",
    // eslint-loader 是否在保存的时候检查(果断不用，这玩意儿我都没装)
    lintOnSave: false,
    productionSourceMap: true, // 不需要生产环境的设置false可以减小dist文件大小，加速构建
    configureWebpack: config => {
        // config.entry.app = ["babel-polyfill", "./src/main.js"];
        config.resolve = {
            extensions: ['.js', '.vue', '.json'],
            alias: {
                'vue$': 'vue/dist/vue.esm.js',
                '@': resolve('src'),
            }
        }
    },
    configureWebpack: {
        plugins: [
            new webpack.ProvidePlugin({
                $: "jquery",
                jQuery: "jquery",
                "windows.jQuery": "jquery"
            })
        ]
    }
}